<form id='{$form.name}' name='{$form.name}'>
{literal}
<style>
#main #right_panel .content table.input_row td .label_text{
width:350px;
}
.action_panel{
width:310px;
}
.search_panel{
width:380px;
}
.search_panel select{
float:left;
margin-right:5px;
}
</style>
{/literal}
<div style="padding-left:25px;padding-right:40px;">
	<div>
{include file="system_appbuilder_btn.tpl.html"}
	<table><tr><td>
		{if $form.icon !='' }
		<div class="form_icon"><img  src="{$form.icon}" border="0" /></div>
		{/if}
		<div style="float:left; width:600px;">
		<h2>
		{$form.title}
		</h2> 
		<p class="form_desc">{$form.description}</p>
		</div>
	</td></tr></table>
	</div>
{if $actionPanel or $searchPanel }	
	<div class="form_header_panel">	
		<div class="action_panel"  style="width:292px;overflow:hidden;padding-left:10px;">
		{foreach item=elem from=$actionPanel}
		    	{$elem.element}
		{/foreach}
		</div>
		<div class="search_panel" style="width:398px;overflow:hidden;">
		{foreach item=elem key=name from=$searchPanel}
			{if $name=='qry_name' ||
				 $name=='btn_dosearch' ||
				 $name=='data_filter' ||
				 $name=='type_selector'} 
				{if $elem.label} {$elem.label} {/if} 
				{$elem.element}
			{/if} 
		{/foreach}
		</div>
	</div>
	<div class="form_header_panel" style="background-color:#dddddd;margin-top:2px;">	
		<div class="action_panel" style="width:690px;padding-left:10px;">
		
		{foreach item=elem key=name from=$searchPanel}
			{if $name!='qry_name' && 
			 	$name!='btn_dosearch' &&
			 	$name!='data_filter' &&
			 	$name!='type_selector'} 
				{if $elem.label} {$elem.label} {/if} 
				{$elem.element}
			{/if} 
		{/foreach}
		</div>
	</div>
{/if}	

<!-- grid start -->
<div class="card_list_grid" style="overflow:hidden;padding-top:5px;">
{assign var=row_counter value=0}

<table  cellspacing="0" border="0">
  <tr> 
  {foreach item=row name=mygrid from=$dataPanel.data}
  {if ($smarty.foreach.mygrid.iteration-1)%3 == 0}
        </tr><tr>
  {/if} 
  <td>
		{if $row_counter == 0}
		<div 
			id="{$form.name}-{$dataPanel.ids[$row_counter]}" normal="even" select="selected"
			class="selected"
			onmouseover="if(this.className!='selected')this.className='hover'" 
			onmouseout="if(this.className!='selected')this.className='even'" 
			onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');"
		>
		{else}
		<div 
			id="{$form.name}-{$dataPanel.ids[$row_counter]}" normal="even" select="selected"
			class="even"
			onmouseover="if(this.className!='selected')this.className='hover'" 
			onmouseout="if(this.className!='selected')this.className='even'" 
			onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');"
		>		
		{/if}
		<div class="grid_cell">
		   
			<div class="grid_cell_content">
				<div class="photo">
					{if $row.fld_photo !=""}
						<image src="{$app_url}{$row.fld_photo}" width="65" height="90"/>
					{else}
						<image src="{$image_url}/profile_photo_icon.gif" width="65" height="90"/>
					{/if}
				</div>
				<div class="contact">
					<h4>{$row.fld_name}</h4>
					<span class="position">{$row.fld_position}</span>
					<div style="padding-top:5px;padding-bottom:3px;">
						<span class="attr">{$row.fld_email}</span>
						<span class="attr">{$row.fld_phone}</span>
						<span class="attr">{$row.fld_mobile}</span>
					</div>
					
				</div>
			</div>
			<div class="grid_cell_footer">
						<div class="cell_type" style="background-color:#{$row.fld_color}">{$row.fld_type}</div>	
						<div class="cell_more"><span class="more">{$row.fld_more}</span></div>
						<div class="cell_share" >{$row.fld_share}</div>				
			</div>
 		</div>
	</div>
	{assign var=row_counter value=$row_counter+1}		
    {/foreach}	
	</td>
 </tr>
</table> 
</div>
<!-- grid end -->


<!-- table start -->
<table border="0" cellpadding="0" cellspacing="0" class="form_table"  style="display:none" id="data_table">
     {assign var=row_counter value=0}    
     {foreach item=row from=$dataPanel.data}
         {if $row_counter == 0}
			<tr id="{$form.name}-{$dataPanel.ids[$row_counter]}" ><td></td></tr>
		{/if}
	{/foreach}
</table>
<!-- table end -->	

	<div class="form_footer_panel">
		<div class="ajax_indicator">
			<div id='{$form.name}.load_disp' style="display:none" >
				<img src="{$image_url}/form_ajax_loader.gif"/>
			</div>
		</div>
		<div class="navi_panel">

{if $navPanel}
   {foreach item=elem from=$navPanel}
   		{if $elem.label} <label style="width:68px;">{$elem.label}</label>{/if}   
    	{$elem.element}
   {/foreach}
{/if}			
		
		</div>		
	</div>
	<div class="v_spacer"></div>
</div>
</form>